home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 51 / 051.d81 / magazine catalog (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  8KB  |  219 lines

  1. 5 iff=1 then 60
  2. 10 rem - setup -
  3. 30 clr:dim ef,e$,t,s,a$,a,oa,q,ec,ke$,ke,ms$,fe
  4. 40 x=500:s$=chr$(13):dim mt$(x),mi$(x),ma$(x),mp$(x),aa$(x),at$(x),mc$(x)
  5. 50 gosub 4000
  6. 55 iff=0 then f=1:load"get'n store.o",8,1
  7. 60 open15,8,15:open2,8,2,"0:catalog,s,r":q=1
  8. 70 gosub90:if ef<>62 then goto1120
  9. 80 close2:ms$="[195][210][197][193][212][197] [206][197][215] [195][193][212][193][204][207][199]":goto720
  10. 90 input#15,ef,e$,t,s:return
  11. 100 print"  [208]ress ([211][208][193][195][197]) to continue. " :g=0
  12. 101 :
  13. 102 geta$:ifa$<>" "then102
  14. 110 poke53280,.:poke53281,.
  15. 111 gosub1470
  16. 120 printtab(15)"[205][193][201][206] [205][197][206][213]":print"[158]  1. [195]hoose by name of magazine"
  17. 130 print"  2. [195]hoose by month/year"
  18. 135 print"  3. [195]hoose by name of article"
  19. 140 print"  4. [195]hoose by author's name"
  20. 145 print"  5. [195]hoose by article subject"
  21. 150 print"  6. [195]heck all entries":print"  7. [193]ppend to catalog"
  22. 160 print"  8. [197]dit catalog":print"  9. [209]uit to [204][207][193][196][211][212][193][210]"
  23. 170 print"[145]  [197]nter choice (1-9):";
  24. 180 sys32768,1,4+128,ke$:ifke$=""orke$=" "then 110
  25. 181 if ke$<"1"orke$>"9"then printchr$(20);:goto 180
  26. 190 ke=val(ke$):on ke goto200,280,360,440,520,600,700,830,630
  27. 200 rem ---
  28. 210 gosub1470
  29. 220 printtab(7)"[211]earch by name of magazine":q=0
  30. 230 print"[206]ame of magazine":sys32768,25,7,tm$
  31. 240 gosub1480
  32. 250 q=q+1:if q>a then1490
  33. 260 if left$(mt$(q),len(tm$))<>tm$then240
  34. 270 gosub1500:goto240
  35. 280 rem - month/year -
  36. 290 gosub1470
  37. 300 printtab(9)"[211]earch by month/year":q=0
  38. 310 print"[205]onth/[217]ear:";:sys32768,7,12,tm$
  39. 320 gosub1480
  40. 330 q=q+1:if q>a then1490
  41. 340 if left$(mi$(q),len(tm$))<>tm$then320
  42. 350 gosub1500:goto320
  43. 360 rem - name of article -
  44. 370 gosub1470
  45. 380 printtab(13)"[211]earch by name of article":q=0
  46. 390 print"[206]ame of article :";:sys32768,25,7,tm$
  47. 400 gosub1480
  48. 410 q=q+1:if q>a then1490
  49. 420 if left$(ma$(q),len(tm$))<>tm$then400
  50. 430 gosub1500:goto400
  51. 440 rem - author's name -
  52. 450 gosub1470
  53. 460 printtab(8)"search by author's name":q=0
  54. 470 print"[193]uthor's name";:sys32768,25,7,tm$
  55. 480 gosub1480
  56. 490 q=q+1:if q>a then1490
  57. 500 if left$(aa$(q),len(tm$))<>tm$then480
  58. 510 gosub1500:goto480
  59. 520 rem - article subject -
  60. 530 gosub1470
  61. 540 printtab(8)"[211]earch by article subject":q=0
  62. 550 print"[193]rticle subject: ";:sys32768,25,7,tm$
  63. 560 gosub1480
  64. 570 q=q+1:if q>a then1490
  65. 580 if left$(at$(q),len(tm$))<>tm$then560
  66. 590 gosub1500:goto560
  67. 600 q=0:rem - search entire list -
  68. 610 q=q+1:if q>a then1490
  69. 620 print"[147]":gosub1170:gosub1250:goto610
  70. 630 rem - quit -
  71. 640 print"[147]"
  72. 650 printtab(12)"[209]uit to [204][207][193][196][211][212][193][210]"
  73. 660 printtab(10)"[193]re you sure? ([217]/[206])";
  74. 665 sys32768,4,1+128,ke$:ifke$=""thenprint"":goto 650
  75. 670 if ke$="[217]"then690
  76. 671 if ke$="[206]"then110
  77. 680 printchr$(20);:goto 665
  78. 690 poke53281,6:poke53280,14:print"[147][154]":printchr$(142):close15
  79. 691 open15,8,15,"r0:hello connect=hello connect":input#15,er,er$:close15
  80. 692 if er<>63 then print"[147]":end
  81. 693 load"hello connect",8
  82. 700 rem - append to catalog -
  83. 710 ms$="[193][208][208][197][206][196] [212][207][160][195][193][212][193][204][207][199]":a=oa
  84. 720 gosub1470:printtab(11)ms$:a=a+1
  85. 730 print"[158][197]nter name of magazine":print":";:sys32768,25,7,mt$(a)
  86. 740 print"[158][197]nter month/year":print":";:sys32768,7,12,mi$(a)
  87. 750 print"[158][197]nter title of article":print":";:sys32768,25,7,ma$(a)
  88. 760 print"[158][197]nter page of article":print":";:sys32768,7,12,mp$(a)
  89. 770 print"[158][197]nter author's name":print":";:sys32768,25,7,aa$(a)
  90. 780 print"[158][197]nter article subject":print":";:sys32768,25,7,at$(a)
  91. 790 print"[158][197]nter comments on article":print" :";:sys32768,38,15,mc$(a)
  92. 800 print"[158] [201]s this correct? ([217]/[206])"
  93. 801 getke$:ifke$=""then 801
  94. 802 ifke$="y"orke$="[217]"then810
  95. 803 ifke$="n"orke$="[206]"thena=a-1:goto720
  96. 805 goto 801
  97. 810 print"[145][196]o you wish to enter another? ([217]/[206])"
  98. 811 getke$:ifke$=""then 811
  99. 812 if ke$="y"orke$="[217]"then 720
  100. 813 if ke$="n"orke$="[206]"then gosub 1020 :goto110
  101. 815 goto 811
  102. 830 rem - edit catalog -
  103. 840 q=0:hm$=""
  104. 850 gosub1470:printtab(15)"[197][196][201][212] [195][193][212][193][204][207][199]":q=q+1:if q>a then990
  105. 860 gosub1170:poke781,22:poke782,2:sys65520
  106. 870 print"[208]ress [[197]] to edit or [[195]] to continue"
  107. 880 print"  listing. [200]it [154][[209]] to quit."
  108. 890 get ke$:if ke$=""then890
  109. 900 if ke$="c"then850
  110. 910 if ke$="q"then1000
  111. 920 if ke$<>"e"then890
  112. 930 fe=1
  113. 935 print"[208]ress [211][208][193][195][197] to edit line - [210]eturn skips"
  114. 940 print"                            "
  115. 950 printhm$+"";:le=25:fu=7:a$=mt$(q):gosub9000:mt$(q)=a$
  116. 951 printhm$+"";:le=7:fu=12:a$=mi$(q):gosub9000:mi$(q)=a$
  117. 952 printhm$+"";:le=25:fu=7:a$=ma$(q):gosub9000:ma$(q)=a$
  118. 953 printhm$+"";:le=5:fu=7:a$=mp$(q):gosub9000:mp$(q)=a$
  119. 954 printhm$+"";:le=25:fu=7:a$=aa$(q):gosub9000:aa$(q)=a$
  120. 955 printhm$+"";:le=25:fu=7:a$=at$(q):gosub9000:at$(q)=a$
  121. 956 printhm$+"":le=80:fu=15:a$=mc$(q):gosub9000:mc$(q)=a$
  122. 980 q=q-1:goto850
  123. 990 print"[147][211]orry! [212]here are no more entries.":forw=1to2000:next
  124. 1000 iffe=1thenfe=0:gosub1020:goto 110
  125. 1010 goto110
  126. 1020 rem - save catalog to disk -
  127. 1030 print#15,"s0:catalog":ec=19:gosub1510
  128. 1040 open2,8,2,"0:catalog,s,w":ec=19:gosub1510
  129. 1050 print#2,a
  130. 1060 for q=1 to a
  131. 1070 print#2,mt$(q)s$mi$(q)s$ma$(q)s$mp$(q)s$aa$(q)s$at$(q)s$mc$(q)s$
  132. 1080 next q:ec=19:gosub1510:close2
  133. 1090 print"[147][195]atalog saved. [208]ress a key to continue."
  134. 1100 get ke$:if ke$=""then1100
  135. 1110 return
  136. 1120 rem - get catalog from disk -
  137. 1130 input#2,a$:a=val(a$):oa=a:for q=1 to a
  138. 1140 input#2,mt$(q),mi$(q),ma$(q),mp$(q),aa$(q),at$(q),mc$(q)
  139. 1150 next q:ec=0:gosub1510:close2
  140. 1160 ifq=0 then goto110
  141. 1161 goto100
  142. 1170 rem - print list -
  143. 1180 sp$="  ":print"  [205]agazine:[158]":printsp$mt$(q)
  144. 1190 print"  [205]onth/[217]ear:[158]":printsp$mi$(q)
  145. 1200 print"  [193]rticle name:[158]":printsp$ma$(q)
  146. 1210 print"  [208]age of article:[158]":printsp$mp$(q)
  147. 1220 print"  [193]uthors name:[158]":printsp$aa$(q)
  148. 1230 print"  [193]rticle subject:[158]":printsp$at$(q)
  149. 1240 print"  [195]omments:[158]":printsp$mc$(q):return
  150. 1250 print"  [208]ress [[195]] to continue listing or"
  151. 1260 print"  press [154][[208]] to print or [[209]] to quit"
  152. 1270 print"  searching and return to menu."
  153. 1280 ke$="":get ke$:if ke$=""then goto1280
  154. 1290 if ke$="c"then return
  155. 1300 if ke$="p"then gosub 1330:return
  156. 1310 if ke$="q"then goto110
  157. 1320 goto1280
  158. 1330 rem - print to printer -
  159. 1331 open16,4,15:close16:ifst<>0 then 8000
  160. 1340 open 3,4,7
  161. 1350 print#3,"[205]agazine--------:";mt$(q)
  162. 1360 print#3,"[205]onth/year------:";mi$(q)
  163. 1370 print#3,"[193]rticle name----:";ma$(q)
  164. 1380 print#3,"[208]age of article-:";mp$(q)
  165. 1390 print#3,"[193]uthors name----:";aa$(q)
  166. 1400 print#3,"[193]rticle subject-:";at$(q)
  167. 1410 print#3,"[195]omments--------:";mc$(q)
  168. 1420 print#3:print#3:close 3
  169. 1430 print"      [208]ress any key to continue."
  170. 1440 get ke$:if ke$=""then1440
  171. 1450 return
  172. 1460 rem - subroutines -
  173. 1470 print"[147]     [158]    [204][207][193][196][211][212][193][210] [208]resents.."
  174. 1471 print"       [205]agazine [193]rticle [195]ataloger"
  175. 1475 return
  176. 1480 print"[147]      [159][208]lease wait...[211]earching.":return
  177. 1490 print"[147]         [211]earch is finished.":forw=1to1500:next:goto110
  178. 1500 print"[147]            [198]ound a match.":gosub1170:gosub1250:return
  179. 1510 gosub90:if ef>ec then print"[196][201][211][203] [197][210][210][207][210] #"ef;e$:close2:close15:end
  180. 1520 return
  181. 4000 poke53265,(peek(53265)and239):poke53280,11:poke53281, 0:print"[147]";
  182. 4001 print"[155]e # 36 Softdisk issue # 51 Big Blue Disk issu[158]                        ";
  183. 4002 print"    [155]ig Blue Disk[158]     Loadstar Presents      [152]s[155]ue # 19 Loa[158]     [163][163][163][163][163][163]";
  184. 4003 print"[163][163][163][163][163][163][163][163][163][163][163]      [152]s[155]ue # 31 Soft[152]disk issue # 53 Loadstar iss[155]ue